Optimal. Leaf size=98 \[ -\frac{2 i \sqrt{a+i a \tan (c+d x)}}{a d}-\frac{i}{d \sqrt{a+i a \tan (c+d x)}}+\frac{i \tanh ^{-1}\left (\frac{\sqrt{a+i a \tan (c+d x)}}{\sqrt{2} \sqrt{a}}\right )}{\sqrt{2} \sqrt{a} d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0957389, antiderivative size = 98, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {3543, 3479, 3480, 206} \[ -\frac{2 i \sqrt{a+i a \tan (c+d x)}}{a d}-\frac{i}{d \sqrt{a+i a \tan (c+d x)}}+\frac{i \tanh ^{-1}\left (\frac{\sqrt{a+i a \tan (c+d x)}}{\sqrt{2} \sqrt{a}}\right )}{\sqrt{2} \sqrt{a} d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3543
Rule 3479
Rule 3480
Rule 206
Rubi steps
\begin{align*} \int \frac{\tan ^2(c+d x)}{\sqrt{a+i a \tan (c+d x)}} \, dx &=-\frac{2 i \sqrt{a+i a \tan (c+d x)}}{a d}-\int \frac{1}{\sqrt{a+i a \tan (c+d x)}} \, dx\\ &=-\frac{i}{d \sqrt{a+i a \tan (c+d x)}}-\frac{2 i \sqrt{a+i a \tan (c+d x)}}{a d}-\frac{\int \sqrt{a+i a \tan (c+d x)} \, dx}{2 a}\\ &=-\frac{i}{d \sqrt{a+i a \tan (c+d x)}}-\frac{2 i \sqrt{a+i a \tan (c+d x)}}{a d}+\frac{i \operatorname{Subst}\left (\int \frac{1}{2 a-x^2} \, dx,x,\sqrt{a+i a \tan (c+d x)}\right )}{d}\\ &=\frac{i \tanh ^{-1}\left (\frac{\sqrt{a+i a \tan (c+d x)}}{\sqrt{2} \sqrt{a}}\right )}{\sqrt{2} \sqrt{a} d}-\frac{i}{d \sqrt{a+i a \tan (c+d x)}}-\frac{2 i \sqrt{a+i a \tan (c+d x)}}{a d}\\ \end{align*}
Mathematica [A] time = 0.733642, size = 113, normalized size = 1.15 \[ -\frac{i \left (\sqrt{1+e^{2 i (c+d x)}} \left (1+5 e^{2 i (c+d x)}\right )-e^{i (c+d x)} \left (1+e^{2 i (c+d x)}\right ) \sinh ^{-1}\left (e^{i (c+d x)}\right )\right )}{d \left (1+e^{2 i (c+d x)}\right )^{3/2} \sqrt{a+i a \tan (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.044, size = 73, normalized size = 0.7 \begin{align*}{\frac{-2\,i}{ad} \left ( \sqrt{a+ia\tan \left ( dx+c \right ) }+{\frac{a}{2}{\frac{1}{\sqrt{a+ia\tan \left ( dx+c \right ) }}}}-{\frac{\sqrt{2}}{4}\sqrt{a}{\it Artanh} \left ({\frac{\sqrt{2}}{2}\sqrt{a+ia\tan \left ( dx+c \right ) }{\frac{1}{\sqrt{a}}}} \right ) } \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.15209, size = 738, normalized size = 7.53 \begin{align*} \frac{{\left (i \, \sqrt{2} a d \sqrt{\frac{1}{a d^{2}}} e^{\left (2 i \, d x + 2 i \, c\right )} \log \left ({\left (\sqrt{2} a d \sqrt{\frac{1}{a d^{2}}} e^{\left (2 i \, d x + 2 i \, c\right )} + \sqrt{2} \sqrt{\frac{a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}{\left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )} e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}\right ) - i \, \sqrt{2} a d \sqrt{\frac{1}{a d^{2}}} e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (-{\left (\sqrt{2} a d \sqrt{\frac{1}{a d^{2}}} e^{\left (2 i \, d x + 2 i \, c\right )} - \sqrt{2} \sqrt{\frac{a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}{\left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )} e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}\right ) + \sqrt{2} \sqrt{\frac{a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}{\left (-10 i \, e^{\left (2 i \, d x + 2 i \, c\right )} - 2 i\right )} e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{4 \, a d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tan ^{2}{\left (c + d x \right )}}{\sqrt{a \left (i \tan{\left (c + d x \right )} + 1\right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tan \left (d x + c\right )^{2}}{\sqrt{i \, a \tan \left (d x + c\right ) + a}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]